package cn.sytton.taffecloud.service.job.service.impl;

import cn.sytton.taffecloud.common.db.model.PageParam;
import cn.sytton.taffecloud.common.servlet.service.BaseService;
import cn.sytton.taffecloud.service.job.entity.JobLogEntity;
import cn.sytton.taffecloud.service.job.mapper.JobLogMapper;
import cn.sytton.taffecloud.service.job.service.IJobLogService;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 定时任务日志服务层实现
 *
 * @author skyrock
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class JobLogService extends BaseService<JobLogEntity> implements IJobLogService {

    @Resource
    private JobLogMapper jobLogMapper;

    @Override
    public PageInfo<JobLogEntity> findListPage(PageParam pp) {
        setPageParams(pp);
        return new PageInfo<>(jobLogMapper.findList(pp.getParams()));
    }
}
